package com.xc.c1

object abstract01 {

  def main(args: Array[String]): Unit = {
    val xx = new super01 {
      override var name: String = _
      override def sayName(name: String): String = name
    }
  }

  abstract class super01 {
    var name: String

    def sayName(name: String): String

  }

  class sub01 extends super01 {
    override var name: String = "hxc"

    override def sayName(name: String): String = {
      println("name is = " + name)
      name
    }
  }

}
